﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Rifts.Controls
{
	public class SectionPanel : ContentControl
	{
		static SectionPanel()
		{
			DefaultStyleKeyProperty.OverrideMetadata(typeof(SectionPanel), new FrameworkPropertyMetadata(typeof(SectionPanel)));
		}

		public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register("Header", typeof(string), typeof(SectionPanel), new PropertyMetadata("", OnHeaderChanged));

		private static void OnHeaderChanged(DependencyObject o, DependencyPropertyChangedEventArgs e)
		{
			var control = o as SectionPanel;
			if (control != null)
				control.OnHeaderChanged((string)e.OldValue, (string)e.NewValue);
		}


		protected virtual void OnHeaderChanged(string oldValue, string newValue)
		{

		}

		public string Header
		{
			get { return (string)GetValue(HeaderProperty); }
			set { SetValue(HeaderProperty, value); }
		}


	}



}
